'use strict';
/**
 * Created by FreezeSoul on 2015/9/30.
 */
define([
        'angular',
        'app/modules/roles/define',
        'app/modules/roles/services/roles'
    ],
    function(angular) {
        angular.module('ad.roles')
            .controller('adRolesDeleteController',['$scope','$uibModalInstance','adRolesService','items',function($scope,$uibModalInstance,service,items) {
                $scope.items = items;

                $scope.ok = function () {
                    service.deleteItems($scope.items).then(function(data){
                        $uibModalInstance.close(data);
                    });
                };

                $scope.cancel = function () {
                    $uibModalInstance.dismiss('cancel');
                };
            }]);
    });